<html xmlns="http://www.w3c.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<script type="text/javascript">
		//<![CDATA[
		//debe usarse los \\:  en lugar de : en los selectores de JQuery
		$(document).ready(function() {
			console.log('Listo');
		});

		//function processLogin(xhr, status, args) {
		//setTimeout(function() {
		//window.location = args.view;
		//}, 500);
		//}
		//]]>
	</script>
	<link rel="stylesheet" type="text/css" href="css/estilo.css" />
	<script type="text/javascript" src="js/main.js" />
</h:head>
<h:body>
        <br/>
		<CENTER><h1><h:outputLabel value="Formulario de Usuario" /></h1></CENTER>
	    <h:form id="form_register">
		<h3 id="estiloletras2">Ingrese los datos y cree una cuenta para
			acceder al robot</h3>
		<br />
		<div id="estiloformulario2">
			<br />
			<div class="ui-form-row clearfix text-align-left">
				<h:outputLabel value="primer nombre" />
			</div>
			<div class="ui-form-row clearfix text-align-left">
				<p:inputText value="#{registrationController.newUser.firstName}" required="true" />
			</div>
			<br />
			<div class="ui-form-row clearfix text-align-left">
				<h:outputLabel value="Segundo nombre" />
			</div>
			<div class="ui-form-row clearfix text-align-left">
				<p:inputText value="#{registrationController.newUser.secondName}"  required="true"/>
			</div>
			<br />
			<div class="ui-form-row clearfix text-align-left">
				<h:outputLabel value="Primer apellido" />
			</div>
			<div class="ui-form-row clearfix text-align-left">
				<p:inputText value="#{registrationController.newUser.firstLastName}" required="true" />
			</div>

			<div class="ui-form-row clearfix text-align-left">
				<h:outputLabel value="Segundo apellido" />
			</div>
			<div class="ui-form-row clearfix text-align-left">
				<p:inputText value="#{registrationController.newUser.secondLastName}" required="true" />
			</div>
			<br />
			<div class="ui-form-row clearfix text-align-left">
				<h:outputLabel value="Usuario" />
			</div>
			<div class="ui-form-row clearfix text-align-left">
				<p:inputText value="#{registrationController.newUser.userName}" required="true"  />
			</div>
			<br />
			<div class="ui-form-row clearfix text-align-left">
				<h:outputLabel value="Password" />
			</div>
			<div class="ui-form-row clearfix text-align-left">
				<p:password value="#{registrationController.newUser.password}" required="true" />
			</div>
			<br />
			<div class="ui-form-row clearfix text-align-center">
			
			<p:commandButton value="Guardar" update="form_register"
				actionListener="#{registrationController.saveNewUser}" oncomplete="currentPagefromServer(xhr, status, args)" />
		    </div>
			
		</div>
		
		
	</h:form>
</h:body>

</html>